<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>sqs.service</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="sqs-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="sqs-module.html">Package&nbsp;sqs</a> ::
        Module&nbsp;service
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="sqs.service-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="sqs.service-module.html">Module sqs.service</a></h1>
<pre class="py-src">
<tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package sqs=sqs-module.html"><a title="sqs" class="py-name" href="#" onclick="return doclink('link-0', 'sqs', 'link-0');">sqs</a></tt></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module sqs.connection=sqs.connection-module.html"><a title="sqs.connection" class="py-name" href="#" onclick="return doclink('link-1', 'connection', 'link-1');">connection</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class sqs.connection.SQSConnection=sqs.connection.SQSConnection-class.html"><a title="sqs.connection.SQSConnection" class="py-name" href="#" onclick="return doclink('link-2', 'SQSConnection', 'link-2');">SQSConnection</a></tt></tt> </tt>
<tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="sqs" class="py-name" href="#" onclick="return doclink('link-3', 'sqs', 'link-0');">sqs</a></tt></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module sqs.objects=sqs.objects-module.html"><a title="sqs.objects" class="py-name" href="#" onclick="return doclink('link-4', 'objects', 'link-4');">objects</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class sqs.objects.SQSQueue=sqs.objects.SQSQueue-class.html"><a title="sqs.objects.SQSQueue" class="py-name" href="#" onclick="return doclink('link-5', 'SQSQueue', 'link-5');">SQSQueue</a></tt></tt> </tt>
<tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="sqs" class="py-name" href="#" onclick="return doclink('link-6', 'sqs', 'link-0');">sqs</a></tt></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Module sqs.parsers=sqs.parsers-module.html"><a title="sqs.parsers" class="py-name" href="#" onclick="return doclink('link-7', 'parsers', 'link-7');">parsers</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Function sqs.parsers.parseQueueList()=sqs.parsers-module.html#parseQueueList"><a title="sqs.parsers.parseQueueList" class="py-name" href="#" onclick="return doclink('link-8', 'parseQueueList', 'link-8');">parseQueueList</a></tt></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Function sqs.parsers.parseQueueCreation()=sqs.parsers-module.html#parseQueueCreation"><a title="sqs.parsers.parseQueueCreation" class="py-name" href="#" onclick="return doclink('link-9', 'parseQueueCreation', 'link-9');">parseQueueCreation</a></tt></tt> </tt>
<tt class="py-lineno"> 4</tt>  <tt class="py-line"> </tt>
<a name="SQSService"></a><div id="SQSService-def"><tt class="py-lineno"> 5</tt> <a class="py-toggle" href="#" id="SQSService-toggle" onclick="return toggle('SQSService');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html">SQSService</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="SQSService-expanded"><tt class="py-lineno"> 6</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">    SQS Service class</tt> </tt>
<tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="SQSService.__init__"></a><div id="SQSService.__init__-def"><tt class="py-lineno"> 9</tt> <a class="py-toggle" href="#" id="SQSService.__init__-toggle" onclick="return toggle('SQSService.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">pub_key</tt><tt class="py-op">,</tt> <tt class="py-param">priv_key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SQSService.__init__-expanded"><tt class="py-lineno">10</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="sqs.connection.SQSConnection" class="py-name" href="#" onclick="return doclink('link-10', 'SQSConnection', 'link-2');">SQSConnection</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">pub_key</tt><tt class="py-op">,</tt> <tt class="py-name">priv_key</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="SQSService.get"></a><div id="SQSService.get-def"><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="SQSService.get-toggle" onclick="return toggle('SQSService.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService.get-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SQSService.get-expanded"><tt class="py-lineno">13</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-docstring">        Get queue with the exact name</tt> </tt>
<tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: The name of the queue</tt> </tt>
<tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-docstring">        @type name:  string</tt> </tt>
<tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-docstring">        @return:     Queue if exists, else None</tt> </tt>
<tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:      SQSQueue or None</tt> </tt>
<tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno">21</tt>  <tt class="py-line">        <tt class="py-name">queues</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method sqs.service.SQSService.list()=sqs.service.SQSService-class.html#list"><a title="sqs.service.SQSService.list" class="py-name" href="#" onclick="return doclink('link-11', 'list', 'link-11');">list</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">queue</tt> <tt class="py-keyword">in</tt> <tt class="py-name">queues</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">23</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">queue</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> <tt class="py-op">==</tt> <tt class="py-name">name</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">24</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">queue</tt> </tt>
<tt class="py-lineno">25</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">27</tt>  <tt class="py-line"> </tt>
<a name="SQSService.list"></a><div id="SQSService.list-def"><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="SQSService.list-toggle" onclick="return toggle('SQSService.list');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html#list">list</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">prefix</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService.list-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SQSService.list-expanded"><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-docstring">        List queues:</tt> </tt>
<tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-docstring">        @param prefix: Queue name prefix.</tt> </tt>
<tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-docstring">        @type prefix:  string</tt> </tt>
<tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-docstring">        @return:       List of queues that begin with prefix</tt> </tt>
<tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:        list</tt> </tt>
<tt class="py-lineno">36</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno">37</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">prefix</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">38</tt>  <tt class="py-line">            <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'QueueNamePrefix'</tt> <tt class="py-op">:</tt> <tt class="py-name">prefix</tt> <tt class="py-op">}</tt> </tt>
<tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<tt class="py-lineno">40</tt>  <tt class="py-line">            <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method sqs.connection.SQSConnection.clone()=sqs.connection.SQSConnection-class.html#clone"><a title="sqs.connection.SQSConnection.clone" class="py-name" href="#" onclick="return doclink('link-12', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method sqs.service.SQSService.get()=sqs.service.SQSService-class.html#get"><a title="sqs.service.SQSService.get" class="py-name" href="#" onclick="return doclink('link-13', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">params</tt><tt class="py-op">=</tt><tt class="py-name">params</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">42</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-14" class="py-name"><a title="sqs.parsers.parseQueueList" class="py-name" href="#" onclick="return doclink('link-14', 'parseQueueList', 'link-8');">parseQueueList</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method sqs.objects.SQSQueue.read()=sqs.objects.SQSQueue-class.html#read"><a title="sqs.objects.SQSQueue.read" class="py-name" href="#" onclick="return doclink('link-15', 'read', 'link-15');">read</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">43</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">44</tt>  <tt class="py-line"> </tt>
<a name="SQSService.create"></a><div id="SQSService.create-def"><tt class="py-lineno">45</tt> <a class="py-toggle" href="#" id="SQSService.create-toggle" onclick="return toggle('SQSService.create');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html#create">create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService.create-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SQSService.create-expanded"><tt class="py-lineno">46</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno">47</tt>  <tt class="py-line"><tt class="py-docstring">        Create a queue</tt> </tt>
<tt class="py-lineno">48</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno">49</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: Name for the new queue</tt> </tt>
<tt class="py-lineno">50</tt>  <tt class="py-line"><tt class="py-docstring">        @type name:  string</tt> </tt>
<tt class="py-lineno">51</tt>  <tt class="py-line"><tt class="py-docstring">        @return:     Returns the newly created queue</tt> </tt>
<tt class="py-lineno">52</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:      SQSQueue</tt> </tt>
<tt class="py-lineno">53</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno">54</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="sqs.connection.SQSConnection.clone" class="py-name" href="#" onclick="return doclink('link-16', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">post</tt><tt class="py-op">(</tt><tt class="py-name">params</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'QueueName'</tt> <tt class="py-op">:</tt> <tt class="py-name">name</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">55</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-17" class="py-name"><a title="sqs.parsers.parseQueueCreation" class="py-name" href="#" onclick="return doclink('link-17', 'parseQueueCreation', 'link-9');">parseQueueCreation</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="sqs.objects.SQSQueue.read" class="py-name" href="#" onclick="return doclink('link-18', 'read', 'link-15');">read</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">56</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">57</tt>  <tt class="py-line"> </tt>
<a name="SQSService.delete"></a><div id="SQSService.delete-def"><tt class="py-lineno">58</tt> <a class="py-toggle" href="#" id="SQSService.delete-toggle" onclick="return toggle('SQSService.delete');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="sqs.service.SQSService-class.html#delete">delete</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SQSService.delete-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SQSService.delete-expanded"><tt class="py-lineno">59</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno">60</tt>  <tt class="py-line"><tt class="py-docstring">        Deletes a queue</tt> </tt>
<tt class="py-lineno">61</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno">62</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: Name of the queue that should be deleted</tt> </tt>
<tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-docstring">        @type  name: string</tt> </tt>
<tt class="py-lineno">64</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno">65</tt>  <tt class="py-line">        <tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="sqs.service.SQSService.get" class="py-name" href="#" onclick="return doclink('link-19', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">66</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_sqs_conn</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="sqs.connection.SQSConnection.clone" class="py-name" href="#" onclick="return doclink('link-20', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method sqs.objects.SQSQueue.delete()=sqs.objects.SQSQueue-class.html#delete,Method sqs.service.SQSService.delete()=sqs.service.SQSService-class.html#delete"><a title="sqs.objects.SQSQueue.delete
sqs.service.SQSService.delete" class="py-name" href="#" onclick="return doclink('link-21', 'delete', 'link-21');">delete</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">queue</tt><tt class="py-op">=</tt><tt class="py-name">q</tt><tt class="py-op">.</tt><tt class="py-name">id</tt><tt class="py-op">)</tt> </tt>
</div></div><tt class="py-lineno">67</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="sqs-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Wed Sep 20 12:10:47 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
